<template>
  <div>
    <x-header :right-options="{showMore: fale}" @on-click-more="showMenus = false">{{detail.title}}</x-header>
    <div class="content">
      <h1 v-text="detail.title"></h1>
      <div v-html="detail.content"></div>
    </div>
  </div>
</template>

<style scoped>
  h1{border-bottom: 1px solid #ddd;margin-bottom: 10px;}
.content{padding:10px;}
  .content img{max-width: 100%}
</style>

<script>
  import { XHeader } from 'vux'

  export default {
    name:'ViewArticle',
    components: {
      XHeader
    },
    mounted() {
      this.$nextTick(function () {
        this.load(1); //概况
      })
    },
    data () {
      return {
        apiUrl: apiUrl,
        type: '1',
        detail: [],
      }
    },
    methods: {
      //分类
      load() {

        this.$http.get(this.apiUrl + 'Article/detail', {
          params: {
            'id': this.$route.params.id
          }
        }).then(response => {
          this.detail = response.data;
        }, response => {

          console.log(response);
        });


      }
    }
  }
</script>
